package org.study.bookmanagerclientbyswing.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
public class AppConfig {
    @Value("${client.host}")
    String host;

    @Value("${client.port}")
    Integer port;

    @Bean
    public WebClient webClient(){
        return WebClient.create("http://" + host + ":" + port);
    }
}
